package cn.ad.model;

import cn.ad.enumration.AdFormat;
import cn.ad.enumration.OsType;
import org.apache.ibatis.type.Alias;

/**
 * Created by Administrator on 2016/7/15.
 */
@Alias("adRptModel")
public class AdRptModel {

    /**
     * 广告位ID
     */
    private int id;
    /**
     * 广告位名称
     */
    private String name;
    /**
     * 广告位形式标识 1 横幅, 2 插屏, 3 开屏,  4 视频, 5 原生
     */
    private int formatId;
    /**
     * 广告位形式名称
     */
    private String formatName;
    /**
     * 广告位所属平台系统标识 0 未知 , 1 Android , 2 IOS , 3 Windows
     */
    private int os;
    /**
     * 广告位所属平台系统名称
     */
    private String osName;

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getFormatId() {
        return formatId;
    }

    public void setFormatId(int formatId) {
        this.formatId = formatId;
    }

    public String getFormatName() {
        return AdFormat.forValue(formatId);
    }

    public void setFormatName(String formatName) {
        this.formatName = formatName;
    }

    public int getOs() {
        return os;
    }

    public void setOs(int os) {
        this.os = os;
    }

    public String getOsName() {
        return OsType.forValue(os);
    }

    public void setOsName(String osName) {
        this.osName = osName;
    }

    @Override
    public String toString() {
        return "AdRptModel{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", formatId=" + formatId +
                ", formatName='" + getFormatName() + '\'' +
                ", os=" + os +
                ", osName='" + getOsName() + '\'' +
                '}';
    }
}
